#ifndef _CameraManager_h_
#define _CameraManager_h_

#include "stdafx.h"

#include <OgreCamera.h>
#include <OgreEntity.h>
#include <OgreLogManager.h>
#include <OgreRoot.h>
#include <OgreViewport.h>
#include <OgreSceneManager.h>
#include <OgreRenderWindow.h>
#include <OgreConfigFile.h>

#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>

#include "Console.h"


class CameraManager : public OIS::KeyListener, public OIS::MouseListener, public Ogre::FrameListener{
public:
	enum cameraMode{
		FREE_LOOK,
		THIRD_PERSON,
		FIRST_PERSON
	};
	CameraManager();

	void setCameraVel(const float nVel);
	float getCameraVel();

	void setCameraMode(const int cmode);
	int getCameraMode();

	void setTarget(Ogre::SceneNode *node);

	void setTargetDist(const float dist);
	float getTargetDist();

	void setFloorDist(const int floorDist);
	int getFloorDist();
private:
	float vel;
	float move;
	float targetDist;
	int floorDist;

	bool foward;
	bool back;
	bool right;
	bool left;

	int mode;

	Ogre::SceneNode *mTarget;
	Ogre::Vector3 dest;
	Ogre::Camera *mCamera;
	Console *mConsole;
	
protected:
	virtual bool keyPressed( const OIS::KeyEvent &arg );
    virtual bool keyReleased( const OIS::KeyEvent &arg );

    virtual bool mouseMoved( const OIS::MouseEvent &arg );
    virtual bool mousePressed( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
    virtual bool mouseReleased( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
	virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);


	
};




#endif _Camera_h_